.class public Lcom/estrongs/android/pop/app/SaveToESActivity;
.super Lcom/estrongs/android/pop/app/FileChooserActivity;
.source "SaveToESActivity.java"


# direct methods
.method public constructor <init>()V
    .locals 0

    .line 1
    invoke-direct {p0}, Lcom/estrongs/android/pop/app/FileChooserActivity;-><init>()V

    return-void
.end method

.method private static a(Landroid/content/Context;Ljava/util/List;)Ljava/util/List;
    .locals 7
    .param p0    # Landroid/content/Context;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .param p1    # Ljava/util/List;
        .annotation build Landroidx/annotation/NonNull;
        .end annotation
    .end param
    .annotation build Landroidx/annotation/NonNull;
    .end annotation

    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Landroid/content/Context;",
            "Ljava/util/List<",
            "Landroid/net/Uri;",
            ">;)",
            "Ljava/util/List<",
            "Lcom/estrongs/fs/g;",
            ">;"
        }
    .end annotation

    .line 2
    new-instance v0, Ljava/util/ArrayList;

    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v1

    invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V

    .line 3
    invoke-static {p0}, Lcom/estrongs/fs/f;->a(Landroid/content/Context;)Lcom/estrongs/fs/f;

    move-result-object v1

    .line 4
    invoke-virtual {p0}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object p0

    .line 5
    invoke-interface {p1}, Ljava/util/List;->size()I

    move-result v2

    const/4 v3, 0x0

    :goto_0
    if-ge v3, v2, :cond_2

    .line 6
    invoke-interface {p1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Landroid/net/Uri;

    .line 7
    invoke-virtual {v4}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v5

    const-string v6, "content"

    invoke-virtual {v6, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-eqz v5, :cond_0

    .line 8
    invoke-static {p0, v4}, Lcom/estrongs/fs/c;->a(Landroid/content/ContentResolver;Landroid/net/Uri;)Lcom/estrongs/fs/c;

    move-result-object v4

    goto :goto_1

    .line 9
    :cond_0
    invoke-virtual {v4}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v4

    :goto_1
    if-eqz v4, :cond_1

    .line 10
    invoke-virtual {v0, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    :cond_1
    add-int/lit8 v3, v3, 0x1

    goto :goto_0

    :cond_2
    return-object v0
.end method

.method static synthetic a(Lcom/estrongs/android/pop/app/SaveToESActivity;Ljava/lang/String;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/pop/app/SaveToESActivity;->d(Ljava/lang/String;)V

    return-void
.end method

.method private d(Ljava/lang/String;)V
    .locals 7

    .line 1
    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    .line 2
    invoke-virtual {p0}, Landroid/app/Activity;->getIntent()Landroid/content/Intent;

    move-result-object v1

    const-string v2, "files_selected"

    .line 3
    invoke-virtual {v1, v2}, Landroid/content/Intent;->getStringArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v2

    .line 4
    invoke-static {p0}, Lcom/estrongs/fs/f;->a(Landroid/content/Context;)Lcom/estrongs/fs/f;

    move-result-object v3

    const/4 v4, 0x0

    if-eqz v2, :cond_0

    .line 5
    invoke-virtual {v2}, Ljava/util/ArrayList;->size()I

    move-result v1

    const/4 v5, 0x0

    :goto_0
    if-ge v5, v1, :cond_4

    .line 6
    invoke-virtual {v2, v5}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Ljava/lang/String;

    invoke-virtual {v3, v6}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v6

    invoke-interface {v0, v6}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    add-int/lit8 v5, v5, 0x1

    goto :goto_0

    .line 7
    :cond_0
    invoke-virtual {v1}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v0

    const-string v2, "android.intent.action.SEND"

    .line 8
    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    const-string v5, "android.intent.extra.STREAM"

    if-eqz v2, :cond_2

    .line 9
    invoke-virtual {v1, v5}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v0

    check-cast v0, Landroid/net/Uri;

    if-nez v0, :cond_1

    .line 10
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/FileChooserActivity;->finish()V

    return-void

    .line 11
    :cond_1
    invoke-static {v0}, Ljava/util/Collections;->singletonList(Ljava/lang/Object;)Ljava/util/List;

    move-result-object v0

    invoke-static {p0, v0}, Lcom/estrongs/android/pop/app/SaveToESActivity;->a(Landroid/content/Context;Ljava/util/List;)Ljava/util/List;

    move-result-object v0

    goto :goto_1

    :cond_2
    const-string v2, "android.intent.action.SEND_MULTIPLE"

    .line 12
    invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_7

    .line 13
    invoke-virtual {v1, v5}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;

    move-result-object v0

    if-eqz v0, :cond_6

    .line 14
    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v1

    if-nez v1, :cond_3

    goto :goto_3

    .line 15
    :cond_3
    invoke-static {p0, v0}, Lcom/estrongs/android/pop/app/SaveToESActivity;->a(Landroid/content/Context;Ljava/util/List;)Ljava/util/List;

    move-result-object v0

    .line 16
    :cond_4
    :goto_1
    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v1

    const/4 v2, 0x1

    if-lez v1, :cond_5

    .line 17
    new-instance v1, Les/z60;

    invoke-virtual {v3, p1}, Lcom/estrongs/fs/f;->g(Ljava/lang/String;)Lcom/estrongs/fs/g;

    move-result-object v5

    invoke-direct {v1, v3, v0, v5}, Les/z60;-><init>(Lcom/estrongs/fs/f;Ljava/util/List;Lcom/estrongs/fs/g;)V

    const v0, 0x7f1102b0

    new-array v3, v2, [Ljava/lang/Object;

    .line 18
    invoke-static {p1}, Lcom/estrongs/android/util/h0;->m(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p1

    aput-object p1, v3, v4

    invoke-virtual {p0, v0, v3}, Landroid/app/Activity;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p1

    invoke-virtual {v1, p1}, Les/s80;->a(Ljava/lang/String;)V

    .line 19
    new-instance p1, Lcom/estrongs/android/pop/e;

    invoke-direct {p1, p0}, Lcom/estrongs/android/pop/e;-><init>(Landroid/content/Context;)V

    invoke-virtual {v1, p1}, Les/s80;->a(Les/v80;)V

    .line 20
    invoke-virtual {v1, v2}, Les/z60;->e(Z)V

    .line 21
    new-instance p1, Lcom/estrongs/android/ui/dialog/a1;

    const v0, 0x7f1108e3

    invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    invoke-direct {p1, p0, v0, v1}, Lcom/estrongs/android/ui/dialog/a1;-><init>(Landroid/app/Activity;Ljava/lang/String;Les/s80;)V

    .line 22
    new-instance v0, Lcom/estrongs/android/pop/app/SaveToESActivity$b;

    invoke-direct {v0, p0}, Lcom/estrongs/android/pop/app/SaveToESActivity$b;-><init>(Lcom/estrongs/android/pop/app/SaveToESActivity;)V

    invoke-virtual {p1, v0}, Lcom/estrongs/android/ui/dialog/a1;->setOnDismissListener(Landroid/content/DialogInterface$OnDismissListener;)V

    .line 23
    invoke-virtual {p1}, Lcom/estrongs/android/ui/dialog/a1;->show()V

    .line 24
    invoke-virtual {v1}, Les/s80;->d()V

    goto :goto_2

    :cond_5
    const p1, 0x7f110774

    .line 25
    invoke-static {p0, p1, v2}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    .line 26
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/FileChooserActivity;->finish()V

    :goto_2
    return-void

    .line 27
    :cond_6
    :goto_3
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/FileChooserActivity;->finish()V

    return-void

    .line 28
    :cond_7
    invoke-virtual {p0}, Lcom/estrongs/android/pop/app/FileChooserActivity;->finish()V

    return-void
.end method


# virtual methods
.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2

    .line 1
    invoke-super {p0, p1}, Lcom/estrongs/android/pop/app/FileChooserActivity;->onCreate(Landroid/os/Bundle;)V

    .line 2
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    if-nez p1, :cond_0

    return-void

    .line 3
    :cond_0
    invoke-static {}, Lcom/estrongs/android/statistics/b;->b()Lcom/estrongs/android/statistics/b;

    move-result-object p1

    const-string v0, "act3"

    const-string v1, "save_to_es"

    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/statistics/b;->b(Ljava/lang/String;Ljava/lang/String;)V

    .line 4
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    const/4 v0, -0x1

    invoke-virtual {p1, v0}, Lcom/estrongs/android/widget/c;->a(I)V

    .line 5
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    const v0, 0x7f11006a

    invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    new-instance v1, Lcom/estrongs/android/pop/app/SaveToESActivity$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/pop/app/SaveToESActivity$a;-><init>(Lcom/estrongs/android/pop/app/SaveToESActivity;)V

    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/widget/c;->b(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 6
    iget-object p1, p0, Lcom/estrongs/android/pop/app/FileChooserActivity;->d:Lcom/estrongs/android/widget/c;

    const v0, 0x7f110299

    invoke-virtual {p0, v0}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v0

    const/4 v1, 0x0

    invoke-virtual {p1, v0, v1}, Lcom/estrongs/android/widget/c;->a(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    return-void
.end method
